package Invalid;
import java.awt.*;
import java.io.*;
import java.util.*;
import java.security.*;

public class ServerControl implements Runnable {
	private Robot myRobot;
	private InputStream inStream;
	private OutputStream outStream;
	
	public ServerControl(InputStream inStream, OutputStream outStream)
	{

		this.inStream = inStream;
		this.outStream = outStream;
		try{

			myRobot = new Robot();
		}
		catch( Exception e )
		{
			System.err.println("Mouse/Keyboard control creating failed!");
		}
		
	}

	@Override
	public void run() {
		Scanner in = new Scanner(inStream);
		PrintWriter out = new PrintWriter(outStream, true);
		System.out.println("Listen to client from ServerControl.");
		while(true){
			if(in.hasNext()){
				String str = in.nextLine();
				System.out.println("The simple command you entered is "+str+" .");
			}
		}
	}
}
